package gstyle.item;

public class BorderBuilder {

    private String borderDefinition = "";

    public BorderBuilder solid() {
        return append("solid");
    }

    public BorderBuilder dashed() {
        return append("dashed");
    }

    public BorderBuilder color(String color) {
        return append(color);
    }

    private BorderBuilder append(String attribute) {
        borderDefinition = borderDefinition + attribute + " ";
        return this;
    }

    public BorderBuilder width(Unit unit) {
        return append(unit.css());
    }

    public String build() {
        return borderDefinition;
    }
}
